package com.eazytec.front;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import com.eazytec.core.pojo.FroMember;
import com.eazytec.front.util.FrontUtil;

public class FrontContextInterceptor extends HandlerInterceptorAdapter {
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
		FroMember member = FrontUtil.getMemberSession(request);
		if (member != null) {
			request.setAttribute(Constants.MEMBER, member);
		}
		return true;
	}
}
